﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OMDR
{
    class DataManager
    {
        private static DataManager instance;
        public List<Project> projectList = new List<Project>();
        public Project currentProject;
        public String nameProject;

        private DataManager()
        {
        }

        public static DataManager getInstance
        {
            get
            {
                if (instance == null)
                {
                    instance = new DataManager();
                }
                return instance;
            }
        }

        /*public void openProject(String parName, DateTime parBeginDate, DateTime parEndDate, List<DateTime> parMilestoneList, 
            List<Objective> parObjectiveList)
        {
            currentProject = new Project(parName, parBeginDate, parEndDate, parMilestoneList, parObjectiveList);
        }*/

        public void setObjective(Objective parObjective)
        {
            currentProject.objectiveList.Add(parObjective);
        }

        public Objective createObjectiveData(String parName, String parDescription, String parType, int parPhase, String parProcess)
        {
            return new Objective(parName, parDescription, parType, parPhase, parProcess);
        }

    }
}
